home *** CD-ROM | disk | FTP | other *** search
/ IRIX Installation Tools & Overlays 2002 November / SGI IRIX Installation Tools & Overlays 2002 November - Disc 4.iso / dist / motif21_dev.idb / usr / Motif-2.1 / include / Xm / Xmfuncs.h.z / Xmfuncs.h
C/C++ Source or Header  |  2002-10-15  |  3KB  |  97 lines

  1. /*
  2.  * $TOG: Xmfuncs.h /main/1 1997/03/24 16:25:46 dbl $
  3.  * 
  4.  * 
  5. Copyright (c) 1990  X Consortium
  6.  
  7. Permission is hereby granted, free of charge, to any person obtaining a copy
  8. of this software and associated documentation files (the "Software"), to deal
  9. in the Software without restriction, including without limitation the rights
  10. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. copies of the Software, and to permit persons to whom the Software is
  12. furnished to do so, subject to the following conditions:
  13.  
  14. The above copyright notice and this permission notice shall be included in
  15. all copies or substantial portions of the Software.
  16.  
  17. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  20. X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  21. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  22. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23.  
  24. Except as contained in this notice, the name of the X Consortium shall not be
  25. used in advertising or otherwise to promote the sale, use or other dealings
  26. in this Software without prior written authorization from the X Consortium.
  27.  *
  28.  */
  29.  
  30. #ifndef _XFUNCS_H_
  31. #define _XFUNCS_H_
  32.  
  33. #include <X11/Xosdefs.h>
  34.  
  35. /* the old Xfuncs.h, for pre-R6 */
  36.  
  37. /* we really don't want this piece of code---offer */
  38. #if defined(_SGIBUGFIX) && defined(XlibSpecificationRelease) && XlibSpecificationRelease < 6
  39. #ifdef X_USEBFUNCS
  40. void bcopy();
  41. void bzero();
  42. int bcmp();
  43. #else
  44. #if (__STDC__ && !defined(X_NOT_STDC_ENV) && !defined(sun) && !defined(macII) && !defined(apollo)) || defined(SVR4) || defined(hpux) || defined(_IBMR2) || defined(_SEQUENT_)
  45. #include <string.h>
  46. #define _XFUNCS_H_INCLUDED_STRING_H
  47. #define bcopy(b1,b2,len) memmove(b2, b1, (size_t)(len))
  48. #define bzero(b,len) memset(b, 0, (size_t)(len))
  49. #define bcmp(b1,b2,len) memcmp(b1, b2, (size_t)(len))
  50. #else
  51. #ifdef sgi
  52. #include <bstring.h>
  53. #else
  54. #ifdef SYSV
  55. #include <memory.h>
  56. void bcopy();
  57. #define bzero(b,len) memset(b, 0, len)
  58. #define bcmp(b1,b2,len) memcmp(b1, b2, len)
  59. #else /* bsd */
  60. void bcopy();
  61. void bzero();
  62. int bcmp();
  63. #endif /* SYSV */
  64. #endif /* sgi */
  65. #endif /* __STDC__ and relatives */
  66. #endif /* X_USEBFUNCS */
  67. #endif /* _SGIBUGFIX */
  68.  
  69. /* the new Xfuncs.h */
  70.  
  71. #if !defined(X_NOT_STDC_ENV) && (!defined(sun) || defined(SVR4))
  72. /* the ANSI C way */
  73. #ifndef _XFUNCS_H_INCLUDED_STRING_H
  74. #include <string.h>
  75. #if defined(_SGIBUGFIX) && ! defined(__sgi)
  76. #undef bzero
  77. #define bzero(b,len) memset(b,0,len)
  78. #endif /* defined(_SGIBUGFIX) && ! defined(__sgi) */ 
  79. #endif
  80. #else /* else X_NOT_STDC_ENV or SunOS 4 */
  81. #if defined(SYSV) || defined(luna) || defined(sun) || defined(__sxg__)
  82. #include <memory.h>
  83. #define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
  84. #if defined(SYSV) && defined(_XBCOPYFUNC)
  85. #undef memmove
  86. #define memmove(dst,src,len) _XBCOPYFUNC((char *)(src),(char *)(dst),(int)(len))
  87. #define _XNEEDBCOPYFUNC
  88. #endif
  89. #else /* else vanilla BSD */
  90. #define memmove(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
  91. #define memcpy(dst,src,len) bcopy((char *)(src),(char *)(dst),(int)(len))
  92. #define memcmp(b1,b2,len) bcmp((char *)(b1),(char *)(b2),(int)(len))
  93. #endif /* SYSV else */
  94. #endif /* ! X_NOT_STDC_ENV else */
  95.  
  96. #endif /* _XFUNCS_H_ */
  97.